-- PwrdLoginView.lua

local PwrdLoginView = class("PwrdLoginView",function() 
    return display.newTouchLayer()
end)

function PwrdLoginView:ctor()
    self.mUINode=cc.CSLoader:createNode(Res.EmaOverseaLoginUI)
    display.doLayout(self.mUINode)
    self:addChild(self.mUINode)
    self:initView()
end

function PwrdLoginView:initView()
    self._ui = display.uiDelegate(self.mUINode)

 
    self._ui.Button_w:addClickEventListener(function()
            executeFunc(self._onOperate, "pwrd", self)
        end)
end

function PwrdLoginView:enableButtons(b)
    self._ui.Button_w:stopAllActions()
    self._ui.Button_w:setTouchEnabled(b)
    if not b then
        self._ui.Button_w:performWithDelay(function()
                self._ui.Button_w:setTouchEnabled(true)
            end, 0.2)
    end
end

function PwrdLoginView:onOperate(cb)
    self._onOperate = cb
end


return PwrdLoginView